package com.workmanager.util;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Administrator on 2016/8/13 0013.
 */
public class springUtil {
    private static springUtil s = null;
    private ApplicationContext context;
    private springUtil(){
        context = new ClassPathXmlApplicationContext("spring.xml");
    }
    public static springUtil getIntance(){
        if(s==null){
            return new springUtil();
        }
        return s;
    }
    public BeanFactory getFactory(){
        return context;
    }
}
